//导入验证模块
const joi = require('joi');

//定义验证规则
const name = joi.string().required();
const alias = joi.string().alphanum().required();
const id = joi.number().integer().min(1).required();

//向外共享验证规则
exports.add_Cate_Schema = {
    body: {
        name,
        alias
    }
}
exports.delete_Cate_Schema = {
    params: {
        id,
    }
}
exports.get_Cate_Schema = {
    params: {
        id,
    }
}
exports.update_Cate_Schema = {
    body: {
        Id: id,
        name,
        alias
    }
}